﻿@*@model IEnumerable<Business.DbConnect.Customer>*@
@model PagedList.IPagedList<Business.DbConnect.Customer>
@using ServerMotorManagement.Utilities;
<table id="rounded-corner">
    <tr>
        <th>
            Họ và tên
        </th>
        <th>
            Ngày tạo
        </th>
        <th>
            Chi chú
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.FullName)
            </td>
            <td>
                @Html.GetDDMMYYYYString(item.CreateDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Comment)
            </td>
            <td>
                <a href="#" lId="@item.Id" class="editLink">
                    <img src="@Url.Content("~/Content/in-admin-panel/images/user_edit.png")"/>
                </a>
            </td>
        </tr>
    }
</table>
<div class="pagination">
    Trang @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    / @Model.PageCount
    @if (!Model.IsFirstPage)
    {
        @Html.ActionLink("<<", "Index", new { page = 1, currentFilter = ViewBag.CurrentFilter })
        @Html.Raw(" ");
        @Html.ActionLink("< ", "Index", new { page = Model.PageNumber - 1, currentFilter = ViewBag.CurrentFilter })
    }
    @if (!Model.IsLastPage)
    {
        @Html.ActionLink(" >", "Index", new { page = Model.PageNumber + 1, currentFilter = ViewBag.CurrentFilter })
        @Html.Raw(" ");
        @Html.ActionLink(">>", "Index", new { page = Model.PageCount, currentFilter = ViewBag.CurrentFilter })
    }
</div>